<?php

/* 
 * EachGo电商网站 新媒体
 * www.eachgo.cn
 */

namespace Home\Controller;
use Think\Controller;
class BrandTypeController extends Controller{
    public function addBrand(){
        $brand=D('BrandType');
        $data=array(
            'brandTypeName'=>'小米',
        );
        $result=$brand->addBrand($data);
        var_dump($result);        
    }
    public function delBrand(){
        $brand=D('BrandType');
        $result=$brand->deleteBrand(3);
        var_dump($result);
    }
    public function getAllBrand(){
        $brand=D('BrandType');
        $result=$brand->queryAll();
        var_dump($result);
    }
    public function updateBrand(){
        $brand=D('BrandType');
        $data=array(
            'id'=>4,
             'brandTypeName'=>'魅族',
        );
        $result=$brand->update($data);
        var_dump($result);
    }
}